# -*- coding: utf-8 -*-
## This code is responsable for creating keyframe animation structure.
## Master Research:         Elisabete Thomaselli Nogueira
## Professor:               Claudio Esperanca
## Graduate Student:	    Victor Soares Bursztyn
## Created in: 13-03-08
## Last updated in: 
class KeyFrame:
    """Represents a key frame item in an animation."""
    frameno = 0
    translation=(0.0,0.0,0.0)
    rotation=(0.0,0.0,1.0,0.0)
    scale=(1.0,1.0,1.0)
    def __init__(self, frameno):
        """Constructor."""
        self.frameno = frameno
        
class PosKeyFrame(KeyFrame):
    """Represents a positional key frame."""
    def __init__(self, frameno, translation):
        """Constructor.
        @param frameno: Frame number of this keyframe.
        @param translation: Three coordinates of a translation displacement."""
        assert (len(translation)==3)
        self.translation=translation
        KeyFrame.__init__(self,frameno)

class RotKeyFrame(KeyFrame):
    """Represents a rotational key frame."""
    def __init__(self, frameno, rotation):
        """Constructor.
        @param frameno: Frame number of this keyframe.
        @param rotation: Three coordinates of a rotation axis plus angle."""
        assert (len(rotation)==4)
        self.rotation=rotation
        KeyFrame.__init__(self,frameno)

class ScaleKeyFrame(KeyFrame):
    """Represents a scale key frame."""
    def __init__(self, frameno, scale):
        """Constructor.
        @param frameno: Frame number of this keyframe.
        @param rotation: Three coordinates of a scale transformation."""
        assert (len(scale)==3)
        self.scale=scale
        KeyFrame.__init__(self,frameno)

